import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_my_favor_item_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeMyFavorItemEntity {
	int? sellerUserId;
	String? sellerName;
	String? sellerIconPath;
	List<XinHeMyFavorItemGoodsCollectViews>? goodsCollectViews;

	XinHeMyFavorItemEntity();

	factory XinHeMyFavorItemEntity.fromJson(Map<String, dynamic> json) => $XinHeMyFavorItemEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeMyFavorItemEntityToJson(this);

	XinHeMyFavorItemEntity copyWith({int? sellerUserId, String? sellerName, String? sellerIconPath, List<XinHeMyFavorItemGoodsCollectViews>? goodsCollectViews}) {
		return XinHeMyFavorItemEntity()
			..sellerUserId= sellerUserId ?? this.sellerUserId
			..sellerName= sellerName ?? this.sellerName
			..sellerIconPath= sellerIconPath ?? this.sellerIconPath
			..goodsCollectViews= goodsCollectViews ?? this.goodsCollectViews;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class XinHeMyFavorItemGoodsCollectViews {
	int? id;
	int? fSellerUserId;
	String? name;
	String? iconPath;
	double? price;
	String? sellerName;
	String? sellerIconPath;

	XinHeMyFavorItemGoodsCollectViews();

	factory XinHeMyFavorItemGoodsCollectViews.fromJson(Map<String, dynamic> json) => $XinHeMyFavorItemGoodsCollectViewsFromJson(json);

	Map<String, dynamic> toJson() => $XinHeMyFavorItemGoodsCollectViewsToJson(this);

	XinHeMyFavorItemGoodsCollectViews copyWith({int? id, int? fSellerUserId, String? name, String? iconPath, double? price, String? sellerName, String? sellerIconPath}) {
		return XinHeMyFavorItemGoodsCollectViews()
			..id= id ?? this.id
			..fSellerUserId= fSellerUserId ?? this.fSellerUserId
			..name= name ?? this.name
			..iconPath= iconPath ?? this.iconPath
			..price= price ?? this.price
			..sellerName= sellerName ?? this.sellerName
			..sellerIconPath= sellerIconPath ?? this.sellerIconPath;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}